package com.yuan.config;

import com.yuan.interceptor.LoginInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class LoginConfig implements WebMvcConfigurer {
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(new LoginInterceptor())//添加拦截器
//                .addPathPatterns("/**")//所拦截的文件/**就是所有请求都拦截，包括静态文件
//                .excludePathPatterns("/","/login","/ddd/**","/adduser","/css/**","/js/**","/imgs/**");//放行请求
//    }
}
